#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File    :   builder.py
@Time    :   2021-09-16 22:04:11
@Author  :   GuoLiuFang
@Version :   0.1
@Contact :   909104374@qq.com
@License :   (C)Copyright 2018-2021, RandomMatrix
@Desc    :   None
'''

# here put the import lib

import dataset

def build_data_loader(cfg):
    param = dict()
    for key in cfg:
        if key == 'type':
            continue
        param[key] = cfg[key]

    data_loader = dataset.__dict__[cfg.type](**param)

    return data_loader